package com.prothink.threadadmindemo.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author mayanping
 * @title: MenuController
 * @projectName ThreadAdminDemo
 * @description: TODO
 * @date 2024/9/1016:29
 */
@RequestMapping("/menus")
@RestController
public class MenuController {

    static  List<Map<String, Object>> menus = new ArrayList<>();

    static {
        Map<String, Object> map1 = new HashMap<>();
        map1.put("name","首页");
        map1.put("path", "/home");
        Map<String, Object> map2 = new HashMap<>();
        map2.put("name","电影");
        map2.put("path", "/movie");
        menus.add(map1);
        menus.add(map2);

    }

    @RequestMapping("/getMenus")
    public Object getMenus(){
        return menus;
    }

}
